package xyz.csmcool.imroom.service;

import xyz.csmcool.imroom.entity.Rooms;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.csmcool.imroom.entity.vo.RoomSimpleVo;
import xyz.csmcool.imutil.webVo.MyPage;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author csmcool
 * @since 2022-08-06
 */
public interface IRoomsService extends IService<Rooms> {

    /**
     * 查询我的聊天室
     * @param page
     * @param limit
     * @param id
     * @return
     */
    MyPage<Rooms> selectMyRooms(Long page,Long limit,Integer id);

    /**
     * 得到所有的房间
     * @param page
     * @param limit
     * @return
     */
    MyPage<Rooms> selectAllRooms(Long page, Long limit);


    /**
     * 搜说房间
     * @param page
     * @param limit
     * @param name
     * @param id *
     * @return
     */
    MyPage<Rooms> searchRoom(Long page, Long limit, String name,Integer id);

    /**
     * 删除房间
     * @param roomId
     * @param userId
     */
    void deleteRoom(Integer roomId,Integer userId);

    /**
     * 查找公开房间
     * @param page
     * @param limit
     * @param name
     * @param sortType
     * @return
     */
    MyPage<Rooms> publicRoom(Long page, Long limit, String name,Integer sortType);

    /**
     * 得到我加入的聊天室
     * @param page
     * @param limit
     * @param id
     * @return
     */
    MyPage<Rooms> getMyRoom(Long page,Long limit,Integer id);

    /**
     * 搜说我加入的房间
     * @param page
     * @param limit
     * @param id
     * @param name
     * @return
     */
    MyPage<Rooms> searchMyRoom(Long page,Long limit,Integer id,String name);

    /**
     * 查找房间信息*
     * @param id
     * @return
     */
    RoomSimpleVo getMySimpleRoomInfo(Integer id);

    /**
     * 是否是我创建的房间
     * @param id
     * @param uid
     * @return
     */
    Boolean isMyRoom(Integer id,Integer uid);

    /**
     * 创建房间
     * @param rooms
     * @return
     */
    Boolean createRoom(Rooms rooms);
}
